<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>按照常规形式写样式绑定</title>
    <style>
        .colordecorate {
            color: red;
        }

        .textdecorate {
            text-decoration: underline;
        }
    </style>
</head>
<body>
<div id="app">
    <h1 class="colordecorate">Hello, World!</h1>
    <!--错误写法-->
    <h1 :class="textdecorate">Hello, Vue!</h1>
    <!--正确写法-->
    <h1 :class="line">Hello, Vue!</h1>
</div>

<script type="module">
    import {createApp} from "../../../../../js/vue.esm-browser.js";

    const app = createApp({
        setup() {
            return {
                line: "textdecorate",
            }
        }
    })
    app.mount("#app")
</script>
</body>
</html>